<?=view('header.html')?>

<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">

        <!-- header -->
        <div class="layui-header custom-header">
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item slide-sidebar">
                    <a href="javascript:;" title="侧边伸缩">
                        <i class="layui-icon layui-icon-shrink-right  layui-icon-spread-right"></i>
                    </a>
                </li>
            </ul>
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item layui-hide-xs">
                    <a onclick="window.open('/')" target="_blank" title="网站首页">
                        <i class="layui-icon layui-icon-website"></i>
                    </a>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;" class="freshThis" title="刷新当前页面">
                        <i class="layui-icon layui-icon-refresh-3"></i>
                    </a>
                </li>
                <li class="layui-nav-item">
                    <a lay-href="app/message/" title="消息">
                        <i class="layui-icon layui-icon-notice"></i>
                        <span class="layui-badge-dot"></span>
                    </a>
                </li>
                <li class="layui-nav-item layui-hide-xs fullscreen">
                    <a href="javascript:;" title="全屏切换">
                        <i class="layui-icon layui-icon-screen-full"></i>
                    </a>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><span class="layui-icon layui-icon-tabs"></span></a>
                    <dl class="layui-nav-child taboption">
                        <dd data-type="fresh"><a><i class="layui-icon layui-icon-refresh"></i> 刷 新 当 前</a></dd>
                        <dd data-type="current"><a><i class="layui-icon layui-icon-close-fill"></i> 关 闭 当 前</a></dd>
                        <dd data-type="other"><a><i class="layui-icon layui-icon-unlink"></i> 关 闭 其 他</a></dd>
                        <dd data-type="all"><a><i class="layui-icon layui-icon-close"></i>关 闭 全 部</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <cite><?=$admin['username'] ?? 'admin'?></cite>
                        <span class="layui-icon layui-icon-down layui-nav-more"></span>
                    </a>
                    <dl class="layui-nav-child ">
                        <dd><a class="editmy">修改资料</a></dd>
                        <dd class="logout"><a><i class="layui-icon layui-icon-logout"></i> 退出</a></dd>
                    </dl>
                </li>
                
            </ul>
        </div>
        <!--/header-->


        <!--sider-->
        <div class="layui-side custom-admin mok-menu">
            <div class="layui-side-scroll">
                <div class="custom-logo">
                    <h2 class="small">C</h2>
                    <h1>CIAMS</h1>
                </div>
                <ul id="Nav" class="layui-nav layui-nav-tree" lay-shrink="all" lay-filter="admin-side-nav">
                    <?php if(isset($menu) && count($menu)>=1):?>
                    <?php foreach($menu as $pid=>$parent):?>
                    <li class="layui-nav-item">
                        <a href="javascript:;"><i class="<?=$parent['icon']?>"></i><em><?=$parent['name']?></em></a>
                        
                        <dl class="layui-nav-child">
                            <?php if(isset($parent['left']) && $parent['left']):?>
                            <?php foreach($parent['left'] as $id=>$t):?>
                            <dd>
                                <a href="javascript:;" data-url="<?php if(isset($t['left']) && $t['left']){echo '';}else{echo $t['uri'];}?>" title="<?=$t['name']?>"> <i class="<?=$t['icon']?>"></i><?=$t['name']?></a>

                                <?php 
                                if(isset($t['left']) && $t['left']):
                                foreach($t['left'] as $endid=>$end):?>
                                <dl class="layui-nav-child">
                                    <dd><a href="javascript:;" data-url="<?=$end['uri']?>" title="<?=$end['name']?>"> <i class="<?=$end['icon']?>"></i><?=$end['name']?></a></dd>
                                </dl>
                                <?php 
                                endforeach;
                                endif;
                                ?>

                            </dd>
                            <?php endforeach;?>
                            <?php endif?>
                        </dl>
                        
                    </li>
                    <?php endforeach;?>
                    <?php endif?>

                </ul>
            </div>
        </div>


        <div class="layui-body">
            <div class="layui-tab mokui-admintab app-container" lay-allowClose="true" lay-filter="admintabs">
                <ul id="appTabs" class="layui-tab-title custom-tab"></ul>
                <!--labcontrol-->
                <!--/labcontrol-->
                <div id="appTabPage" class="layui-tab-content"></div>
                <!-- <div class="mok-content"></div> -->
            </div>
        </div>

        <div class="layui-footer layui-hide">
            <p>© 2020 版权所有：<a href="https://www.lianpuyun.cn/" target="_blank">连云港连普信息科技有限公司</a></p>
        </div>

        <div class="mobile-mask"></div>
    </div>
    <?=view('statics.html')?>
    <script>
        layui.config({
            skin: 'mokui',
            base: '/assets/mokui/mods/'
        }).use(['mokui'], function () {
            var mokui = layui.mokui;
            mokui.loadHome({ title: '控制台', url: 'admin/home/main' });
            window.openTab = function (title, url) {
                mokui.loadView({ title: title, url: url });
            }
        })
    </script>
</body>

</html>